#include "stdafx.h"
#include "ControlEx.h"


CControlUI* CDialogBuilderCallbackEx::CreateControl(LPCTSTR pstrClass) 
{
	if( _tcscmp(pstrClass, _T("ComputerExamine")) == 0 )
		return new ComputerExamineUI();
	else if( _tcscmp(pstrClass, _T("PhoneMain")) == 0 )
		return new  hereMyPhoneMainUI();


	return NULL;
}

ComputerExamineUI::ComputerExamineUI()
{
	CDialogBuilder builder;
	CContainerUI* pComputerExamine = static_cast<CContainerUI*>(builder.Create(_T("ComputerExamine.xml"), (UINT)0));
	if( pComputerExamine )
	{
		this->Add(pComputerExamine);
	}
	else
	{
		this->RemoveAll();
		return;
	}
}


hereMyPhoneMainUI::hereMyPhoneMainUI()
{
	CDialogBuilder builder;
	CControlUI* pComputerExamine = static_cast<CControlUI*>(builder.Create(_T("PhoneMain.xml")));
	if( pComputerExamine )
	{
		this->Add(pComputerExamine);
	}
	else
	{
		this->RemoveAll();
		return;
	}
}
